package springDaoAndHibernate;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.blog.dao.UserValiDate;
import com.blog.entity.User;
import com.blog.services.loginModel.LoginImplService;
import com.blog.services.loginModel.impl.LoginService;

public class DaoHibernateBasic {

	 static ApplicationContext ac = null;
	 @BeforeClass
	 public static void beforeClass(){
		 DaoHibernateBasic.ac = new  ClassPathXmlApplicationContext("classpath:spring/applicationContext.xml","file:src/main/webapp/WEB-INF/spring-servlet.xml");
	 }

	 @Test
	 public void a(){
		 
		 User u = new User();
		 u.setName("sdfsf");
		 u.setPassWord("sssssssssssss");
		 ((LoginImplService)ac.getBean("loginService")).loginS(u);
		 
	 }
	 
	 @Test
	 public void LoginController(){
		 
	 }
}
